package com.ict.web.task;

import com.ict.common.utils.StringUtils;
import com.ict.framework.manager.AsyncManager;
import com.ict.system.service.ISysDeptService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 定时任务调度 同步项目系统信息数据
 *
 * @author YobertJomi
 */
@Component("refreshDeptTask")
public class RefreshDeptTask {


    @Resource
    private ISysDeptService deptService;



    protected Logger logger = LoggerFactory.getLogger(getClass());

    public void refreshStatusMultipleParams(String s, Boolean b, Long l, Double d, Integer i) {
        System.out.println(StringUtils.format("执行多参方法： 字符串类型{}，布尔类型{}，长整型{}，浮点型{}，整形{}", s, b, l, d, i));
    }

    public void refreshStatusParams(String params) {
        System.out.println("执行有参方法：" + params);
    }

    public void refreshStatusNoParams() {
        System.out.println("执行无参方法");
    }

    public void refreshStatus() {
        logger.error("执行定时任务调度 同步部门信息");
        AsyncManager.me().execute(RefreshDeptTaskAsyncFactory.asyncStatus(deptService));
    }
}
